package com.tian.core.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Actioncolumn entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "actioncolumn", catalog = "portalservermond")
public class Actioncolumn implements java.io.Serializable {

	// Fields

	private Integer id;
	private String actioncolumnname;
	private String actioncolumninfo;
	private String urlString;
	private Set<Action> actions = new HashSet<Action>(0);

	// Constructors

	/** default constructor */
	public Actioncolumn() {
	}

	/** minimal constructor */
	public Actioncolumn(String actioncolumnname) {
		this.actioncolumnname = actioncolumnname;
	}

	/** full constructor */
	public Actioncolumn(String actioncolumnname, Set<Action> actions) {
		this.actioncolumnname = actioncolumnname;
		this.actions = actions;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "actioncolumnname", nullable = false, length = 100)
	public String getActioncolumnname() {
		return this.actioncolumnname;
	}

	public void setActioncolumnname(String actioncolumnname) {
		this.actioncolumnname = actioncolumnname;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "actioncolumn")
	public Set<Action> getActions() {
		return this.actions;
	}

	public void setActions(Set<Action> actions) {
		this.actions = actions;
	}
	@Column(name = "urlstring", length = 100)
	public String getUrlString() {
		return urlString;
	}

	public void setUrlString(String urlString) {
		this.urlString = urlString;
	}
	@Column(name = "actioncolumninfo", length = 100)
	public String getActioncolumninfo() {
		return actioncolumninfo;
	}

	public void setActioncolumninfo(String actioncolumninfo) {
		this.actioncolumninfo = actioncolumninfo;
	}

}